home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbtable.dxr / 00001_Start Stop Code.ls next >
Encoding:
Text File  |  2000-01-18  |  1.9 KB  |  78 lines

  1. on startMovie
  2.   cursor(4)
  3.   if count(the windowList) = 0 then
  4.     clearGlobals()
  5.     unLoad()
  6.     case #b of
  7.       #a:
  8.         fn = "congress"
  9.       #b:
  10.         fn = "poprace"
  11.       #c:
  12.         fn = "compound"
  13.       #ct:
  14.         fn = "commtech"
  15.       #cg:
  16.         fn = "congress"
  17.       #cs:
  18.         fn = "products"
  19.       #d:
  20.         fn = "discount"
  21.       #i:
  22.         fn = "immigrat"
  23.       #in:
  24.         fn = "income"
  25.       otherwise:
  26.         fn = "popage"
  27.     end case
  28.     fn = fn & ".cst"
  29.     init(fn && "Immigration and Naturalization Service worker", fn)
  30.   end if
  31. end
  32.  
  33. on CloseMIAW
  34.   global gDBTableVarList, gForgetList
  35.   go(the frame + 1)
  36.   MyObj = getaProp(gDBTableVarList, GetObjProp())
  37.   deleteProp(gDBTableVarList, GetObjProp())
  38.   append(gForgetList, the activeWindow)
  39. end
  40.  
  41. on convertTable
  42.   memberIndex = 100
  43.   rectList = member(1, 3).text
  44.   repeat with n = 1 to 6
  45.     tableMem = member(n + 2, 3)
  46.     fieldMem = new(#field, member(19 + n, 3))
  47.     memberIndex = memberIndex + 1
  48.     fieldMem.text = string(tableMem.tableData)
  49.     tmpRect = value(rectList.line[n])
  50.     if tmpRect.left > 0 then
  51.       repeat with row = 1 to tableMem.rowCount
  52.         repeat with Col = 1 to tableMem.columnCount
  53.           bitmapMem = new(#bitmap, member(memberIndex, 3))
  54.           memberIndex = memberIndex + 1
  55.           bitmapMem.name = string("Table" && n && "Row" && row && "Col" && Col)
  56.           getCellBitmap(tableMem, point(Col, row), bitmapMem)
  57.           putCell(tableMem, point(Col, row), bitmapMem)
  58.         end repeat
  59.       end repeat
  60.     end if
  61.   end repeat
  62. end
  63.  
  64. on convertTables
  65.   repeat with filenum = 1 to 9999
  66.     fName = getNthFileNameInFolder(the moviePath & "tblcast:", filenum)
  67.     if fName = EMPTY then
  68.       exit repeat
  69.     end if
  70.     if fName = "Tabled.cst" then
  71.       next repeat
  72.     end if
  73.     castLib(3).fileName = the moviePath & "tblcast:" & fName
  74.     convertTable()
  75.     save(castLib(3))
  76.   end repeat
  77. end
  78.